package com.lebang.model;

import com.lebang.model.enums.buss.TaskCategory;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @Author: hwq
 * @Date: 2020/3/2 14:22
 * @Version 1.0
 */
@Data
public class MoneyCategory {
    /**
     * 是否计入排行榜
     */
    private Whether isRank;
    /**
     * 是否计入师徒返利
     */
    private Whether isMaster;

    /**
     * 任务类型
     */
    private TaskCategory taskCategory;

    /**
     * 用户带来的收益
     */
    private BigDecimal myMoney;

    public MoneyCategory isRank() {
        this.isRank = Whether.YES;
        return this;
    }

    public MoneyCategory isMaster() {
        this.isMaster = Whether.YES;
        return this;
    }

    public MoneyCategory notRank() {
        this.isRank = Whether.NO;
        return this;
    }

    public MoneyCategory notMaster() {
        this.isMaster = Whether.NO;
        return this;
    }

    /**
     * 默认全部值
     */
    public MoneyCategory(Whether status,TaskCategory category) {
        this.isRank = status;
        this.isMaster = status;
        this.myMoney=BigDecimal.ZERO;
        this.taskCategory=category;
    }
    /**
     * 默认全部值 带上金额
     */
    public MoneyCategory(Whether status,TaskCategory category,BigDecimal money) {
        this.isRank = status;
        this.isMaster = status;
        this.myMoney=money;
        this.taskCategory=category;
    }
}
